package jsu.blogger.util;

import java.util.Map;

public class DataProcessingUtil {

    public static Long getLongValue(Map<String, Object> map, String key, Long defaultValue) {
        Object value = map.get(key);
        if (value instanceof Integer) {
            return ((Integer) value).longValue();
        } else if (value instanceof Long) {
            return (Long) value;
        } else {
            return defaultValue;
        }
    }
}
